package com.han.fu.api.business.enums;

import lombok.Getter;

/**
 * 审核状态枚举
 *
 * @author: star.zhu
 * @date: 2021-08-15
 */
public enum AuditStatusEnum {

    /**
     * 审核状态
     */
    NOT_APPROVED(0, "未审核"),
    PASSED(1, "已通过"),
    FAIL(2, "未通过");

    @Getter
    private int code;

    @Getter
    private String desc;

    AuditStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(int code) {
        for (AuditStatusEnum anEnum : values()) {
            if (anEnum.code == code) {
                return anEnum.getDesc();
            }
        }
        return null;
    }
}
